package com.landeb.shop.huo;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.landeb.shop.R;
import com.youth.banner.loader.ImageLoader;

/**
 * 首页frag banner的图片加载器
 * Created by blade on 2016/10/15.
 */

public class BannerLoader extends ImageLoader {
    @Override
    public void displayImage(final Context context, final Object path, ImageView imageView) {


        imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        Glide.with(context)
                .load(path)
//                .diskCacheStrategy( DiskCacheStrategy.NONE )
//                .skipMemoryCache( true )
                .error(R.drawable.error_pic)
                .into(imageView);
        /**
         * 设置轮播图事件监听
         * */
//        imageView.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Toast.makeText(context, path + "", Toast.LENGTH_SHORT).show();
//            }
//        });


    }
}
